//获取第n个质数
// Created by denglibin on 2021/4/21.
//
#include "stdio.h"
#include <windows.h>
static int is_prime(int n)
{
    if (n < 2)
        return 0;
    for (int j = 2; j * j <= n; j++)
    {
        if (n % j == 0)
        {
            return 0;
        }
    }
    return 1;
}

int main33()
{
    DWORD start, stop;
    start = GetTickCount();
    int n = 10000, s = 0, i = 2;
    while (s != n)
    {
        if (is_prime(i))
        {
            s++;
            // printf("%d,\n",i);
        }
        i++;
    }
    stop = GetTickCount();
    printf("%d\n", i - 1);
    printf("time:%lu ms\n", stop - start);

    return 0;
}